package com.midea.ai.air.ui.home.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.midea.ai.air.R;
import com.midea.ai.air.common.BaseFragment;
import com.midea.ai.air.common.ConsVal;
import com.midea.ai.air.ui.home.ActivityNotSlip;
import com.midea.ai.air.utils.JumpUtils;

/**
 * Created by ouyangdi on 2016/3/31.
 * 天气页面Fragment
 */
public class WeatherFragment extends BaseFragment implements View.OnClickListener{
    private TextView mTextLocation;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_home_weather, container, false);
        initViews(view);
        return view;
    }

    private void initViews(View view) {
        mTextLocation = (TextView)view.findViewById(R.id.tv_position_detail);
        mTextLocation.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_position_detail:
                JumpUtils.toPage(getActivity(), getString(R.string.air_home_choose_city), getString(R.string.air_home_weather),
                        ConsVal.ACTIVITY_TAG_HOME_WEATHER_CITIES, ActivityNotSlip.class);
                break;
        }
    }
}
